<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {

        $nav = array(
            array('url' => 'home/sort','name' => '分类'),
            array('url' => 'home/list/buy','name' => '榜单'),
            array('url' => 'home/press','name' => '出版社'),
        );

        view()->composer('linfeng/home/index',function($view) use($nav){
            $view->with('nav',$nav);
        });

        $write = array(
            array('url' => 'zjxhome/course','name' => '课程'),
            array('url' => 'zjxhome/special','name' => '专栏'),
            array('url' => 'zjxhome/consult','name' => '咨询'),
        );
        view()->composer('layouts/home-marster',function($view) use($write){
            $view->with('nav',$write);
        });

    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
